import { GET_LOAN_DATA } from "../../Action/loanProcess/loanprocess";
import objectAssign from "object-assign";
//借款数据
const loanData = {
	lnid: "", //产品编号
	loanAmt: "", //所借金额
	chooseDate: "-1", //借款期限
	chooseDateLabel: "请选择",
	chooseRepayType: "-1", //选择的还款方式
	chooseRepayTypeLabel: "请选择",
	chooseLoanPurpose: "-1", //选择的借款用途,
	chooseLoanPurposeLabel: "请选择",
	chooseCardID: "", //选择卡券ID
	cardInfo: "请选择", //选择卡券信息
	cardAmount: "", //选择券面
	cardDay: "", //优惠天数
	cino: "", //借据编号
	lnPlanSeq: "", //期供编号
	souceId: "", //页面标记
	backPage: "", //页面回退标记
	loanPreviewData: "", //借款预览页面数据
	objContract: "", //合同详情
	fltrate: "", //年利率
	pageDesc: "" // 借款结果页错误提示
};

const loanProcessDataReducer = (state = loanData, action = {}) => {
	switch (action.type) {
		case GET_LOAN_DATA:
			return objectAssign({}, state, action.options);
		default:
			return state;
	}
};
export default loanProcessDataReducer;
